﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Model;
using System.Data;

namespace BLL
{
    public class MessageReadBO
    {
        public MessageReadBO() { }

        MessageReadDAO dao = new MessageReadDAO();

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(MessageRead model)
        {
            return dao.Add(model);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(MessageRead model)
        {
            dao.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(int ID)
        {
            dao.Delete(ID);
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MessageRead GetModel(int ID)
        {
            return dao.GetModel(ID);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MessageRead GetModel(string FromUserName,int ID)
        {
            return dao.GetModel(FromUserName,ID);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dao.GetList(strWhere);
        }

        /// <summary>
        /// 获取未读消息
        /// </summary>
        /// <param name="FromUserName"></param>
        /// <returns></returns>
        public DataTable GetNoReadMessage(string FromUserName)
        {
            return dao.GetNoReadMessage(FromUserName);
        }

        ///// <summary>
        ///// 获得前几行数据
        ///// </summary>
        //public DataSet GetList(int Top, string strWhere, string filedOrder)
        //{
        //    return dao.GetList
        //}
    }
}
